package site.brood.common.log.service;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;
import site.brood.common.log.feign.LogFeign;
import site.brood.common.core.constant.Constants;
import site.brood.common.log.pojo.LogLoginDto;
import site.brood.common.log.pojo.LogOperationDto;

@Service
public class LogService {

    @Autowired
    private LogFeign logFeign;

    //异步调用日志feign
    @Async
    public void operLogAdd(LogOperationDto logOperationDto){
        logFeign.operLogAdd(logOperationDto, Constants.FROM_SOURCE_INNER);
    }
    //异步调用日志feign
    @Async
    public void loginLogAdd(LogLoginDto logLoginDto){
        logFeign.loginLogAdd(logLoginDto, Constants.FROM_SOURCE_INNER);
    }

}
